fix: Gutenberg CSS bleed into Bricks editor + dark mode toggle + misc - #176
Conversation
Essential includes all core/ modules (tokens, reset, layout, states, motion, etc.) — not just reset + tokens. Optimal adds color palette, forms, and legacy support. Full adds components and utilities on top. Updated both the WP settings page (class-admin.php) and the Bricks admin SPA (BundleTab.svelte) + rebuilt assets. https://claude.ai/code/session_01DU3r3kT7GqH7w7jeadV2DT
…anel When both integrations are active (unified plugin), the Gutenberg enqueue hook had no bricks_is_builder_main() guard, so it loaded the SLASHED CSS framework on the Bricks editor page even though the Core and Bricks enqueue classes correctly skipped it. The universal resets (margin/padding, svg display:block, button font:inherit, etc.) then bled into the Bricks builder chrome, causing deformed icons in the panel UI. https://claude.ai/code/session_01DU3r3kT7GqH7w7jeadV2DT
…toggle
Bricks only activates its dark-mode toggle element when at least one
color in the Color Manager has a dark_mode variant. SLASHED color entries
previously only had hex + raw fields, so the toggle was permanently inert.
Adding dark_mode: { hex, raw } with the same var() reference as light
mode is sufficient — SLASHED's CSS custom properties already switch to
their dark values when data-brx-theme="dark" is set on <html> (bridged
by the inline rule in class-enqueue.php). Bricks just needed to see the
dark_mode field present to unlock the toggle.
https://claude.ai/code/session_01DU3r3kT7GqH7w7jeadV2DT
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughThe PR synchronizes CSS bundle option descriptions across three admin UI layers, adds Bricks dark-mode palette metadata, and prevents style enqueuing in Bricks builder context. The bundle labels now provide more specific descriptions of included layers and components. ChangesCSS Bundle UI and Bricks Integration Updates
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
$(cat <<'EOF'
Summary
Slashed_Gutenberg_Enqueue::enqueue_frontend_styles()lacked abricks_is_builder_main()guard. In the unified plugin both integrations registerwp_enqueue_scriptshandlers — the Core and Bricks enqueues correctly skipped loading on the builder page, but the Gutenberg enqueue did not, causing SLASHED's universal reset (margin: 0,padding: 0,svg { display: block }, etc.) to apply to the Bricks builder chrome and deform its icons.dark_modefield. SLASHED color entries previously had onlyhex+raw. Addeddark_mode: { hex, raw }with the samevar()reference — SLASHED's CSS custom properties already switch values whendata-brx-theme="dark"is set, so Bricks just needed to see the field to unlock the toggle.../../../dist/fromintegrations/bricks/andintegrations/gutenberg/only goes 3 levels up toplugins/— needed../../../../dist/to reach the repo-rootdist/directory. Local file fallback was always falling through to CDN.core/layer (tokens, reset, layout, states, motion, etc.). Optimal adds color palette, forms, and legacy support. Full adds components and utilities. Fixed in both the WP settings page and the Bricks admin SPA.tests/element-types.test.jsimported from../integrations/bricks/(old pre-restructure path); updated to../plugins/SLASHED-for-WP/integrations/bricks/.data/classes-hints.jsonreplaced withpath.relative(ROOT, OUT)so messages always reflect the actual output location.Test plan
https://claude.ai/code/session_01DU3r3kT7GqH7w7jeadV2DT
EOF
)
Generated by Claude Code
Summary by CodeRabbit
Bug Fixes
Improvements